package com.central.scheduler.master.runner.task;

import com.central.scheduler.common.enums.ExecutionStatus;
import com.central.scheduler.dao.model.ProcessInstance;
import com.central.scheduler.dao.model.TaskInstance;

/**
 * @author Tindy
 * @date 2021/11/5
 * @describe
 * interface of task processor in master
 */
public interface ITaskProcessor {

    void run();

    boolean action(TaskAction taskAction);

    String getType();

    boolean submit(TaskInstance taskInstance, ProcessInstance processInstance, int masterTaskCommitRetryTimes, int masterTaskCommitInterval);

    ExecutionStatus taskState();

}